package com.shop.common.model.param.trade;

import com.shop.common.entity.trade.OrderLog;
import com.shop.common.util.DateUtil;
import com.shop.common.util.state.DataStatus;
import lombok.Data;

/**
 * @Description:
 *
 * @author zhoulk
 * @date: 2019年04月15日  0:13
 */
@Data
public class OrderLogInput extends OrderLog {
    public static OrderLogInput newOrderLogInput(Integer orderId,Integer type,Integer state,Integer beforProcess,
                                                 Integer afterProcess,Integer buyerId,Integer mchtId,String comment){
        OrderLogInput orderLogInput = new OrderLogInput();
        orderLogInput.setOrderId(orderId);
        orderLogInput.setType(type);
        orderLogInput.setState(state);
        orderLogInput.setAfterProcess(afterProcess);
        orderLogInput.setBeforProcess(beforProcess);
        orderLogInput.setBuyerId(buyerId);
        orderLogInput.setMchtId(mchtId);
        orderLogInput.setComment(comment);
        orderLogInput.setCreateTime(DateUtil.newNowDate());
        orderLogInput.setDataStatus(DataStatus.USE.value());
        return orderLogInput;
    }
}
